package java_thinking.unit_14._14_7_Proxy.Excercise;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * @Description :
 * @author: cww
 * @DateTime: 2019/4/1 8:47
 */

public class DynamicProxyHandler implements InvocationHandler {
    Object object ;
    public DynamicProxyHandler(Object object) {
        this.object = object;
    }
    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        System.out.println("Proxy Class : "+proxy.getClass().getName());
        return method.invoke(object,args);
    }
}
